package org.digitarts.rtms.spring.collectors;

import java.util.Map;
import java.util.concurrent.ScheduledExecutorService;

import javax.management.ObjectName;

public interface ICollector extends Runnable
{
	public static final String	TRACING_NAMESPACE_KEY	= "TracingNameSpaceKey";

	boolean isLogErrors();

	void setLogErrors(boolean b);

	void setTracingNameSpace(String[] nameSpace);

	String[] getTracingNameSpace();

	void setFrequency(long frequency);

	void setInitialDelay(long delay);

	long getFrequency();

	long getInitialDelay();

	ObjectName getObjectName();

	void setObjectName(ObjectName objectName);

	String getCollectorType();

	void preCollect();

	void postCollect();

	void collect();

	void init();

	void start();

	void stop();

	void setScheduler(ScheduledExecutorService sheduler);

	void setGlobalConfiguration(Map<String, Object> config);

	long getLastSuccessfulCollection();

	long getLastCollectionAttempt();

	CollectorState getState();

	String getStateName();

}
